Kinetis SDK API Reference Manual  1.0.0-beta
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

The section describes the programming interface of the SIM HAL driver. More...

Data Structures

struct  sim_clock_gate_module_config_t
 Clock gate module configuration table structure. More...
 
struct  sim_clock_source_value_t
 clock source value table structure More...
 
struct  sim_clock_name_config_t
 Clock name configuration table structure. More...
 

Enumerations

enum  sim_clock_names_t {
  kSimCoreClock,
  kSimSystemClock,
  kSimPlatformClock,
  kSimBusClock,
  kSimFlexBusClock,
  kSimFlashClock,
  kSimOsc32kClock,
  kSimOsc0ErClock,
  kSimOsc1ErClock,
  kSimIrc48mClock,
  kSimRtc32kClock,
  kSimRtc1hzClock,
  kSimLpoClock,
  kSimMcgFllClock,
  kSimMcgPll0Clock,
  kSimMcgPll1Clock,
  kSimMcgOutClock,
  kSimMcgIrClock,
  kSimSDHC0_CLKIN,
  kSimENET_1588_CLKIN,
  kSimEXTAL_Clock,
  kSimEXTAL1_Clock,
  kSimUSB_CLKIN,
  kSimReserved,
  kSimClockNameCount
}
 
enum  sim_clock_gate_module_names_t {
  kSimClockModuleDMA,
  kSimClockModuleDMAMUX,
  kSimClockModulePORT,
  kSimClockModuleMPU,
  kSimClockModuleLLWU,
  kSimClockModuleEWM,
  kSimClockModuleOSC1,
  kSimClockModuleFTF,
  kSimClockModuleNFC,
  kSimClockModuleFLEXBUS,
  kSimClockModuleDDR,
  kSimClockModuleCRC,
  kSimClockModuleRNGA,
  kSimClockModuleREGFILE,
  kSimClockModuleDRYICESECREG,
  kSimClockModuleDRYICE,
  kSimClockModuleADC,
  kSimClockModuleCMP,
  kSimClockModuleDAC,
  kSimClockModuleVREF,
  kSimClockModuleSAI,
  kSimClockModuleTPM,
  kSimClockModulePDB,
  kSimClockModuleFTM,
  kSimClockModulePIT,
  kSimClockModuleLPTIMER,
  kSimClockModuleCMT,
  kSimClockModuleRTC,
  kSimClockModuleENET,
  kSimClockModuleUSBHS,
  kSimClockModuleUSBFS,
  kSimClockModuleUSBDCD,
  kSimClockModuleFLEXCAN,
  kSimClockModuleSPI,
  kSimClockModuleI2C,
  kSimClockModuleUART,
  kSimClockModuleESDHC,
  kSimClockModuleLPUART,
  kSimClockModuleTSI,
  kSimClockModuleLCDC,
  kSimClockModuleMax
}
 Clock gate module names.
 
enum  sim_clock_source_names_t {
  kSimClockNfcSrc,
  kSimClockEsdhcSrc,
  kSimClockSdhcSrc,
  kSimClockLcdcSrc,
  kSimClockTimeSrc,
  kSimClockRmiiSrc,
  kSimClockUsbfSrc,
  kSimClockUsbSrc,
  kSimClockUsbhSrc,
  kSimClockUart0Src,
  kSimClockTpmSrc,
  kSimClockOsc32kSel,
  kSimClockUsbfSel,
  kSimClockPllfllSel,
  kSimClockNfcSel,
  kSimClockLcdcSel,
  kSimClockTraceSel,
  kSimClockClkoutSel,
  kSimClockRtcClkoutSel,
  kSimClockSourceMax
}
 Clock source and sel names.
 
enum  sim_clock_divider_names_t {
  kSimClockDividerOutdiv1,
  kSimClockDividerOutdiv2,
  kSimClockDividerOutdiv3,
  kSimClockDividerOutdiv4,
  kSimClockDividerUsbFrac,
  kSimClockDividerUsbDiv,
  kSimClockDividerUsbfsFrac,
  kSimClockDividerUsbfsDiv,
  kSimClockDividerUsbhsFrac,
  kSimClockDividerUsbhsDiv,
  kSimClockDividerLcdcFrac,
  kSimClockDividerLcdcDiv,
  kSimClockDividerNfcFrac,
  kSimClockDividerNfcDiv,
  kSimClockDividerSpecial1,
  kSimClockDividerMax
}
 Clock Divider names.
 
enum  sim_usbsstby_stop_t {
  kSimUsbsstbyNoRegulator,
  kSimUsbsstbyWithRegulator
}
 SIM USB voltage regulator in standby mode setting during stop modes.
 
enum  sim_usbvstby_stop_t {
  kSimUsbvstbyNoRegulator,
  kSimUsbvstbyWithRegulator
}
 SIM USB voltage regulator in standby mode setting during VLPR and VLPW modes.
 
enum  sim_cmtuartpad_strengh_t {
  kSimCmtuartSinglePad,
  kSimCmtuartDualPad
}
 SIM CMT/UART pad drive strength.
 
enum  sim_ptd7pad_strengh_t {
  kSimPtd7padSinglePad,
  kSimPtd7padDualPad
}
 SIM PTD7 pad drive strength.
 
enum  sim_flexbus_security_level_t {
  kSimFbslLevel0,
  kSimFbslLevel1,
  kSimFbslLevel2,
  kSimFbslLevel3
}
 SIM FlexBus security level.
 
enum  sim_pretrgsel_t {
  kSimAdcPretrgselA,
  kSimAdcPretrgselB
}
 SIM ADCx pre-trigger select.
 
enum  sim_trgsel_t {
  kSimAdcTrgselExt,
  kSimAdcTrgSelHighSpeedComp0,
  kSimAdcTrgSelHighSpeedComp1,
  kSimAdcTrgSelHighSpeedComp2,
  kSimAdcTrgSelPit0,
  kSimAdcTrgSelPit1,
  kSimAdcTrgSelPit2,
  kSimAdcTrgSelPit3,
  kSimAdcTrgSelFtm0,
  kSimAdcTrgSelFtm1,
  kSimAdcTrgSelFtm2,
  kSimAdcTrgSelFtm3,
  kSimAdcTrgSelRtcAlarm,
  kSimAdcTrgSelRtcSec,
  kSimAdcTrgSelLptimer,
  kSimAdcTrgSelHigSpeedComp3
}
 SIM ADCx trigger select.
 
enum  sim_uart_rxsrc_t {
  kSimUartRxsrcPin,
  kSimUartRxsrcCmp0,
  kSimUartRxsrcCmp1,
  kSimUartRxsrcReserved
}
 SIM receive data source select.
 
enum  sim_uart_txsrc_t {
  kSimUartTxsrcPin,
  kSimUartTxsrcCmp0,
  kSimUartTxsrcCmp1,
  kSimUartTxsrcReserved
}
 SIM transmit data source select.
 
enum  sim_ftm_trg_src_t {
  kSimFtmTrgSrc0,
  kSimFtmTrgSrc1
}
 SIM FlexTimer x trigger y select.
 
enum  sim_ftm_clk_sel_t {
  kSimFtmClkSel0,
  kSimFtmClkSel1
}
 SIM FlexTimer external clock select.
 
enum  sim_ftm_ch_src_t {
  kSimFtmChSrc0,
  kSimFtmChSrc1,
  kSimFtmChSrc2,
  kSimFtmChSrc3
}
 SIM FlexTimer x channel y input capture source select.
 
enum  sim_ftm_flt_sel_t {
  kSimFtmFltSel0,
  kSimFtmFltSel1
}
 SIM FlexTimer x Fault y select.
 
enum  sim_tpm_clk_sel_t {
  kSimTpmClkSel0,
  kSimTpmClkSel1
}
 SIM Timer/PWM external clock select.
 
enum  sim_tpm_ch_src_t {
  kSimTpmChSrc0,
  kSimTpmChSrc1
}
 SIM Timer/PWM x channel y input capture source select.
 
enum  sim_hal_status_t {
  kSimHalSuccess,
  kSimHalFail,
  kSimHalNoSuchModule,
  kSimHalNoSuchClockSrc,
  kSimHalNoSuchDivider
}
 SIM HAL API return status.
 

Variables

const sim_clock_name_config_t kSimClockNameConfigTable []
 clock name configuration table for specified CPU defined in fsl_clock_module_names_Kxxx.h
 
const
sim_clock_gate_module_config_t 
kSimClockGateModuleConfigTable []
 SIM configuration table for clock module names.
 
const sim_clock_source_value_tkClockSourceValueTable []
 clock source value table for specified CPU
 

clock related feature APIs

sim_hal_status_t clock_hal_set_gate (sim_clock_gate_module_names_t clockModule, uint8_t instance, bool enable)
 Enables or disables the clock for a specified clock module. More...
 
sim_hal_status_t clock_hal_get_gate (sim_clock_gate_module_names_t clockModule, uint8_t instance, bool *isEnabled)
 Gets the clock enabled or disabled state. More...
 
sim_hal_status_t clock_hal_set_clock_source (sim_clock_source_names_t clockSource, uint8_t setting)
 Sets the clock source setting. More...
 
sim_hal_status_t clock_hal_get_clock_source (sim_clock_source_names_t clockSource, uint8_t *setting)
 Gets the clock source setting. More...
 
sim_hal_status_t clock_hal_set_clock_divider (sim_clock_divider_names_t clockDivider, uint32_t setting)
 Sets the clock divider setting. More...
 
void clock_hal_set_clock_out_dividers (uint32_t outdiv1, uint32_t outdiv2, uint32_t outdiv3, uint32_t outdiv4)
 Sets the clock out dividers setting. More...
 
sim_hal_status_t clock_hal_get_clock_divider (sim_clock_divider_names_t clockDivider, uint32_t *setting)
 Gets the clock divider setting. More...
 

individual field access APIs

static void sim_set_usbregen (bool enable)
 Sets the USB voltage regulator enabled setting. More...
 
static bool sim_get_usbregen (void)
 Gets the USB voltage regulator enabled setting. More...
 
static void sim_set_usbsstby (sim_usbsstby_stop_t setting)
 Sets the USB voltage regulator in a standby mode setting during Stop, VLPS, LLS, and VLLS. More...
 
static sim_usbsstby_stop_t sim_get_usbsstby (void)
 Gets the USB voltage regulator in a standby mode setting. More...
 
static void sim_set_usbvstby (sim_usbvstby_stop_t setting)
 Sets the USB voltage regulator in a standby mode during the VLPR or the VLPW. More...
 
static sim_usbvstby_stop_t sim_get_usbvstby (void)
 Gets the USB voltage regulator in a standby mode during the VLPR or the VLPW. More...
 
static void sim_set_usswe (bool enable)
 Sets the USB voltage regulator stop standby write enable setting. More...
 
static bool sim_get_usswe (void)
 Gets the USB voltage regulator stop standby write enable setting. More...
 
static void sim_set_uvswe (bool enable)
 Sets the USB voltage regulator VLP standby write enable setting. More...
 
static bool sim_get_uvswe (void)
 Gets the USB voltage regulator VLP standby write enable setting. More...
 
static void sim_set_urwe (bool enable)
 Sets the USB voltage regulator enable write enable setting. More...
 
static bool sim_get_urwe (void)
 Gets the USB voltage regulator enable write enable setting. More...
 
void sim_set_alttrgen (uint8_t instance, bool enable)
 Sets the ADCx alternate trigger enable setting. More...
 
bool sim_get_alttrgen (uint8_t instance)
 Gets the ADCx alternate trigger enable setting. More...
 
void sim_set_pretrgsel (uint8_t instance, sim_pretrgsel_t select)
 Sets the ADCx pre-trigger select setting. More...
 
sim_pretrgsel_t sim_get_pretrgsel (uint8_t instance)
 Gets the ADCx pre-trigger select setting. More...
 
void sim_set_trgsel (uint8_t instance, sim_trgsel_t select)
 Sets the ADCx trigger select setting. More...
 
sim_pretrgsel_t sims_get_trgsel (uint8_t instance)
 Gets the ADCx trigger select setting. More...
 
void sim_set_uart_rxsrc (uint8_t instance, sim_uart_rxsrc_t select)
 Sets the UARTx receive data source select setting. More...
 
sim_uart_rxsrc_t sim_get_uart_rxsrc (uint8_t instance)
 Gets the UARTx receive data source select setting. More...
 
void sim_set_uart_txsrc (uint8_t instance, sim_uart_txsrc_t select)
 Sets the UARTx transmit data source select setting. More...
 
sim_uart_txsrc_t sim_get_uart_txsrc (uint8_t instance)
 Gets the UARTx transmit data source select setting. More...
 
static uint32_t sim_get_fam_id (void)
 Gets the Kinetis Fam ID in System Device ID register (SIM_SDID). More...
 
static uint32_t sim_get_pin_id (void)
 Gets the Kinetis Pincount ID in System Device ID register (SIM_SDID). More...
 
static uint32_t sim_get_rev_id (void)
 Gets the Kinetis Revision ID in the System Device ID register (SIM_SDID). More...
 
static uint32_t sim_get_pf_size (void)
 Gets the program flash size in the Flash Configuration Register 1 (SIM_FCFG). More...
 

SIM Hal Driver

Overview

The system integration module (SIM) provides the system control and chip configuration registers. The sim_hal provides a set of APIs used to access the SIM registers including clock gate control and other configuration settings.

Clock Gate Control register access APIs

Clock gate control is based on the module. Each chip has a sub-set of modules that can be gated through gate control registers in SIM. The gate control module names are defined in the fsl_clock_names.h. Each chip also provides a configuration table that defines the supported module names in that chip. Users can access the gate control through the clock manager. See the clock manager for examples to enable a clock module.

Clock Source Control access APIs

Clock source control is also based on the module. Only certain modules have the clock source control in SIM. See the fsl_sim_features.h for available clock sources controlled by the SIM registers. Others are controlled by the device registers. See device drivers for those that are not supported by the SIM registers.

Clock Divider access APIs

Certain clocks use dividers configured in SIM. Only certain dividers are available from SIM. See details in the fsl_sim_features.h for available dividers provided by SIM.This is an example of SIM HAL access APIs

#include "sim/fsl_sim_types.h"
#include "sim/hal/fsl_sim_hal.h"
// calling sim clock gate control API to enable the clock for DMA
clock_hal_set_gate(kSimClockModuleDMA, 0, true);
#include "sim/fsl_sim_types.h"
#include "sim/hal/fsl_sim_hal.h"
uint8_t setting;
// calling sim clock source control API to get the setting for USBSRC
clock_hal_get_clock_source(kSimClockUsbSrc, &setting);
#include "sim/fsl_sim_types.h"
#include "sim/hal/fsl_sim_hal.h"
uint32_t divider;
// calling sim divider access API to get the setting for divider outdiv1
clock_hal_get_clock_divider(kSimClockDividerOutdiv1, &divider);

Data Structure Documentation

struct sim_clock_gate_module_config_t

Data Fields

sim_clock_gate_module_names_t clockGateModuleName
 clock module name
 
uint8_t deviceInstance
 device instance
 
uint32_t scgcRegAddress
 clock gate control register address
 
uint32_t deviceMask
 device mask in control register
 
struct sim_clock_source_value_t

Data Fields

union {
   uint8_t   name
 
   sim_clock_names_t   clockName
 clock name
 
   sim_clock_source_names_t   clockSelName
 
}; 
 
bool isSel
 clock sel flag
 
bool hasDivider
 has divider
 
sim_clock_divider_names_t dividerName
 divider name
 
struct sim_clock_name_config_t

Data Fields

sim_clock_names_t clockName
 clock name
 
bool useOtherRefClock
 if it uses the other ref clock
 
sim_clock_names_t otherRefClockName
 other ref clock name
 
sim_clock_divider_names_t dividerName
 clock divider name
 

Function Documentation

sim_hal_status_t clock_hal_set_gate ( sim_clock_gate_module_names_t  clockModule,
uint8_t  instance,
bool  enable 
)

This function enables/disables the clock for a specified clock module and instance.

Parameters
clockModuleClock module name defined in the sim_clock_gate_module_names_t
instanceModule instance
enableEnable or disable the clock
  • true: enable the clock
  • false: disable the clock
Returns
status If the clock module name doesn't exist, it returns an error.
sim_hal_status_t clock_hal_get_gate ( sim_clock_gate_module_names_t  clockModule,
uint8_t  instance,
bool *  isEnabled 
)

This function gets the current clock gate status of the specified clock module and instance.

Parameters
clockModuleClock module name defined in sim_clock_gate_module_names_t
instanceModule instance
isEnabledreturned status, clock is enabled or disabled for the module.
  • true: enabled
  • false: disabled
Returns
status if the clock module name doesn't exist, it returns an error.
sim_hal_status_t clock_hal_set_clock_source ( sim_clock_source_names_t  clockSource,
uint8_t  setting 
)

This function sets the settings for a specified clock source. Each clock source has its own clock selection settings. See the chip reference manual for clock source detailed settings and the sim_clock_source_names_t for clock sources.

Parameters
clockSourceClock source name defined in sim_clock_source_names_t
settingSetting value
Returns
status If the clock source doesn't exist, it returns an error.
sim_hal_status_t clock_hal_get_clock_source ( sim_clock_source_names_t  clockSource,
uint8_t *  setting 
)

This function gets the settings for a specified clock source. Each clock source has its own clock selection settings. See the reference manual for clock source detailed settings and the sim_clock_source_names_t for clock sources.

Parameters
clockSourceClock source name
settingCurrent setting for the clock source
Returns
status If the clock source doesn't exist, it returns an error.
sim_hal_status_t clock_hal_set_clock_divider ( sim_clock_divider_names_t  clockDivider,
uint32_t  setting 
)

This function sets the setting for a specified clock divider. See the reference manual for a supported clock divider and value range and the sim_clock_divider_names_t for dividers.

Parameters
clockDividerClock divider name
dividerDivider setting
Returns
status If the clock divider doesn't exist, it returns an error.
void clock_hal_set_clock_out_dividers ( uint32_t  outdiv1,
uint32_t  outdiv2,
uint32_t  outdiv3,
uint32_t  outdiv4 
)

This function sets the setting for all clock out dividers at the same time. See the reference manual for a supported clock divider and value range and the sim_clock_divider_names_t for clock out dividers.

Parameters
outdiv1Outdivider1 setting
outdiv2Outdivider2 setting
outdiv3Outdivider3 setting
outdiv4Outdivider4 setting
sim_hal_status_t clock_hal_get_clock_divider ( sim_clock_divider_names_t  clockDivider,
uint32_t *  setting 
)

This function gets the setting for a specified clock divider. See the reference manual for a supported clock divider and value range and the sim_clock_divider_names_t for dividers.

Parameters
clockDividerClock divider name
dividerDivider value pointer
Returns
status If the clock divider doesn't exist, it returns an error.
static void sim_set_usbregen ( bool  enable)
inlinestatic

This function controls whether the USB voltage regulator is enabled. This bit can only be written when the SOPT1CFG[URWE] bit is set.

Parameters
enableUSB voltage regulator enable setting
  • true: USB voltage regulator is enabled.
  • false: USB voltage regulator is disabled.
static bool sim_get_usbregen ( void  )
inlinestatic

This function gets the USB voltage regulator enabled setting.

Returns
enabled True if the USB voltage regulator is enabled.
static void sim_set_usbsstby ( sim_usbsstby_stop_t  setting)
inlinestatic

This function controls whether the USB voltage regulator is placed in a standby mode during Stop, VLPS, LLS, and VLLS modes. This bit can only be written when the SOPT1CFG[USSWE] bit is set.

Parameters
settingUSB voltage regulator in standby mode setting
  • 0: USB voltage regulator not in standby during Stop, VLPS, LLS and VLLS modes.
  • 1: USB voltage regulator in standby during Stop, VLPS, LLS and VLLS modes.
static sim_usbsstby_stop_t sim_get_usbsstby ( void  )
inlinestatic

This function gets the USB voltage regulator in a standby mode setting.

Returns
setting USB voltage regulator in a standby mode setting
static void sim_set_usbvstby ( sim_usbvstby_stop_t  setting)
inlinestatic

This function controls whether the USB voltage regulator is placed in a standby mode during the VLPR and the VLPW modes. This bit can only be written when the SOPT1CFG[UVSWE] bit is set.

Parameters
settingUSB voltage regulator in standby mode setting
  • 0: USB voltage regulator not in standby during VLPR and VLPW modes.
  • 1: USB voltage regulator in standby during VLPR and VLPW modes.
static sim_usbvstby_stop_t sim_get_usbvstby ( void  )
inlinestatic

This function gets the USB voltage regulator in a standby mode during the VLPR or the VLPW.

Returns
setting USB voltage regulator in a standby mode during the VLPR or the VLPW
static void sim_set_usswe ( bool  enable)
inlinestatic

This function controls whether the USB voltage regulator stop standby write feature is enabled. Writing one to this bit allows the SOPT1[USBSSTBY] bit to be written. This register bit clears after a write to SOPT1[USBSSTBY].

Parameters
enableUSB voltage regulator stop standby write enable setting
  • true: SOPT1[USBSSTBY] can be written.
  • false: SOPT1[USBSSTBY] cannot be written.
static bool sim_get_usswe ( void  )
inlinestatic

This function gets the USB voltage regulator stop standby write enable setting.

Returns
enabled True if the USB voltage regulator stop standby write is enabled.
static void sim_set_uvswe ( bool  enable)
inlinestatic

This function controls whether USB voltage regulator VLP standby write feature is enabled. Writing one to this bit allows the SOPT1[USBVSTBY] bit to be written. This register bit clears after a write to SOPT1[USBVSTBY].

Parameters
enableUSB voltage regulator VLP standby write enable setting
  • true: SOPT1[USBSSTBY] can be written.
  • false: SOPT1[USBSSTBY] cannot be written.
static bool sim_get_uvswe ( void  )
inlinestatic

This function gets the USB voltage regulator VLP standby write enable setting.

Returns
enabled True if the USB voltage regulator VLP standby write is enabled.
static void sim_set_urwe ( bool  enable)
inlinestatic

This function controls whether the USB voltage regulator write enable feature is enabled. Writing one to this bit allows the SOPT1[USBREGEN] bit to be written. This register bit clears after a write to SOPT1[USBREGEN].

Parameters
enableUSB voltage regulator enable write enable setting
  • true: SOPT1[USBSSTBY] can be written.
  • false: SOPT1[USBSSTBY] cannot be written.
static bool sim_get_urwe ( void  )
inlinestatic

This function gets the USB voltage regulator enable write enable setting.

Returns
enabled True if USB voltage regulator enable write is enabled.
void sim_set_alttrgen ( uint8_t  instance,
bool  enable 
)

This function enables/disables the alternative conversion triggers for ADCx.

Parameters
enableEnable alternative conversion triggers for ADCx
  • true: Select alternative conversion trigger.
  • false: Select PDB trigger.
bool sim_get_alttrgen ( uint8_t  instance)

This function gets the ADCx alternate trigger enable setting.

Returns
enabled True if ADCx alternate trigger is enabled
void sim_set_pretrgsel ( uint8_t  instance,
sim_pretrgsel_t  select 
)

This function selects the ADCx pre-trigger source when the alternative triggers are enabled through ADCxALTTRGEN.

Parameters
selectpre-trigger select setting for ADCx
  • 0: Pre-trigger A selected for ADCx.
  • 1: Pre-trigger B selected for ADCx.
sim_pretrgsel_t sim_get_pretrgsel ( uint8_t  instance)

This function gets the ADCx pre-trigger select setting.

Returns
select ADCx pre-trigger select setting
void sim_set_trgsel ( uint8_t  instance,
sim_trgsel_t  select 
)

This function selects the ADCx trigger source when alternative triggers are enabled through ADCxALTTRGEN.

Parameters
selecttrigger select setting for ADCx
  • 0000: External trigger
  • 0001: High speed comparator 0 asynchronous interrupt
  • 0010: High speed comparator 1 asynchronous interrupt
  • 0011: High speed comparator 2 asynchronous interrupt
  • 0100: PIT trigger 0
  • 0101: PIT trigger 1
  • 0110: PIT trigger 2
  • 0111: PIT trigger 3
  • 1000: FTM0 trigger
  • 1001: FTM1 trigger
  • 1010: FTM2 trigger
  • 1011: FTM3 trigger
  • 1100: RTC alarm
  • 1101: RTC seconds
  • 1110: Low-power timer trigger
  • 1111: High speed comparator 3 asynchronous interrupt
sim_pretrgsel_t sims_get_trgsel ( uint8_t  instance)

This function gets the ADCx trigger select setting.

Returns
select ADCx trigger select setting
void sim_set_uart_rxsrc ( uint8_t  instance,
sim_uart_rxsrc_t  select 
)

This function selects the source for the UARTx receive data.

Parameters
selectthe source for the UARTx receive data
  • 00: UARTx_RX pin.
  • 01: CMP0.
  • 10: CMP1.
  • 11: Reserved.
sim_uart_rxsrc_t sim_get_uart_rxsrc ( uint8_t  instance)

This function gets the UARTx receive data source select setting.

Returns
select UARTx receive data source select setting
void sim_set_uart_txsrc ( uint8_t  instance,
sim_uart_txsrc_t  select 
)

This function selects the source for the UARTx transmit data.

Parameters
selectthe source for the UARTx transmit data
  • 00: UARTx_TX pin.
  • 01: UARTx_TX pin modulated with FTM1 channel 0 output.
  • 10: UARTx_TX pin modulated with FTM2 channel 0 output.
  • 11: Reserved.
sim_uart_txsrc_t sim_get_uart_txsrc ( uint8_t  instance)

This function gets the UARTx transmit data source select setting.

Returns
select UARTx transmit data source select setting
static uint32_t sim_get_fam_id ( void  )
inlinestatic

This function gets the Kinetis Fam ID in System Device ID register.

Returns
id Kinetis Fam ID
static uint32_t sim_get_pin_id ( void  )
inlinestatic

This function gets the Kinetis Pincount ID in System Device ID register.

Returns
id Kinetis Pincount ID
static uint32_t sim_get_rev_id ( void  )
inlinestatic

This function gets the Kinetis Revision ID in System Device ID register.

Returns
id Kinetis Revision ID
static uint32_t sim_get_pf_size ( void  )
inlinestatic

This function gets the program flash size in the Flash Configuration Register 1.

Returns
size Program flash Size